]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Make all our window clones use the MetaWindowActor as source
authorRui Matos <tiagomatos@gmail.com>
Wed, 1 Feb 2017 18:01:47 +0000 (19:01 +0100)
committerRui Matos <tiagomatos@gmail.com>
Thu, 2 Feb 2017 13:28:00 +0000 (14:28 +0100)
Using a MetaWindowActor's shaped texture as the source for window
clones means that if there are further MetaSurfaceActor children
(e.g. a wayland client using sub-surfaces) they don't get cloned.

This obviously wasn't an issue until wayland clients introduced the
possibility of having multiple MetaSurfaceActors under a
MetaWindowActor but there's no fundamental reason we can't clone the
toplevel actor.

WorkspaceThumbnail.WindowClone is the one class that was already using
the MetaWindowActor instead of the texture although it seems to have
been an unintended change in commit
8b99617513da1713ff88ca4abf54e6125405d31c.

https://bugzilla.gnome.org/show_bug.cgi?id=756715

js/ui/altTab.js
js/ui/overview.js
js/ui/workspace.js

index d101335681e52b9630baced619b1dd100fdc4a00..95306817d0f206ad017a1eb453745520621fca56 100644 (file)
@@ -33,10 +33,9 @@ const AppIconMode = {
 };
 
 function _createWindowClone(window, size) {
-    let windowTexture = window.get_texture();
-    let [width, height] = windowTexture.get_size();
+    let [width, height] = window.get_size();
     let scale = Math.min(1.0, size / width, size / height);
-    return new Clutter.Clone({ source: windowTexture,
+    return new Clutter.Clone({ source: window,
                                width: width * scale,
                                height: height * scale,
                                x_align: Clutter.ActorAlign.CENTER,
index ab95ddb17f0b29c95d918cd6c8619c9ea3edc67e..04a92b57061ba109512b10edd3e671861782a28f 100644 (file)
@@ -378,7 +378,7 @@ const Overview = new Lang.Class({
             return null;
 
         let window = windows[0];
-        let clone = new Clutter.Clone({ source: window.get_texture(),
+        let clone = new Clutter.Clone({ source: window,
                                         x: window.x, y: window.y });
         clone.source.connect('destroy', Lang.bind(this, function() {
             clone.destroy();
index bacc75b6daa88b019e6eaa9022d82be4e76263eb..a1d1582aec8fa64474415ca0964f4c7196367d50 100644 (file)
@@ -111,7 +111,7 @@ const WindowClone = new Lang.Class({
         this.metaWindow._delegate = this;
         this._workspace = workspace;
 
-        this._windowClone = new Clutter.Clone({ source: realWindow.get_texture() });
+        this._windowClone = new Clutter.Clone({ source: realWindow });
         // We expect this.actor to be used for all interaction rather than
         // this._windowClone; as the former is reactive and the latter
         // is not, this just works for most cases. However, for DND all